<template>
    <div class="modify-dialog">
        <slot> </slot>
        <el-dialog v-bind="dialogOpts" :visible.sync="dialogVisible" :close-on-click-modal="false">
            <div class="page-wrap" style="height: 65vh">
                <Table :pagination="false" v-bind="tableOpts" defaultExpandAll v-on="tableEvent">
                </Table>
            </div>
        </el-dialog>
    </div>
</template>

<script>
import modifyMixins from "@/mixins/modifyMixins.vue";
import tableMixins from "@/mixins/tableMixins.vue";

export default {
    name: "InventoryRecordDetail",
    mixins: [tableMixins, modifyMixins],
    data () {
        return {
            apiName: "materialInoutMaterials",
            dialogWidth: "80vw",
            form: {
                id: {
                    tag: "el-input",
                    label: "订单编号",
                    value: "",
                    props: {
                        clearable: true,
                        placeholder: "请输入订单编号",
                    },
                },
            },
        };
    },
    computed: {
        title () {
            return this.row.status == 0 ? '出库清单' : "入库清单";
        },
    },
    mounted () { },
    methods: {
        showDialog (modify = "add", row = {}) {
            this.dialogVisible = true;
            this.row = row;
            this.fetchCurrentTable();
        },
        formatQuery (params) {
            params.id = this.row.id;
            return params;
        },
    },
};
</script>

<style lang="less" scoped>
:deep(.el-table__expanded-cell) {
    padding: 0;
}
</style>

